package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.PerEmergencyDispatchApplicationMapper;
import com.traffic.domain.PerEmergencyDispatchApplication;
import com.traffic.service.IPerEmergencyDispatchApplicationService;

/**
 * 出警申请Service业务层处理
 * 
 * @author 郭世纪
 * @date 2024-12-08
 */
@Service
public class PerEmergencyDispatchApplicationServiceImpl implements IPerEmergencyDispatchApplicationService 
{
    @Autowired
    private PerEmergencyDispatchApplicationMapper perEmergencyDispatchApplicationMapper;

    /**
     * 查询出警申请
     * 
     * @param overtimeId 出警申请主键
     * @return 出警申请
     */
    @Override
    public PerEmergencyDispatchApplication selectPerEmergencyDispatchApplicationByOvertimeId(Long overtimeId)
    {
        return perEmergencyDispatchApplicationMapper.selectPerEmergencyDispatchApplicationByOvertimeId(overtimeId);
    }

    /**
     * 查询出警申请列表
     * 
     * @param perEmergencyDispatchApplication 出警申请
     * @return 出警申请
     */
    @Override
    public List<PerEmergencyDispatchApplication> selectPerEmergencyDispatchApplicationList(PerEmergencyDispatchApplication perEmergencyDispatchApplication)
    {
        return perEmergencyDispatchApplicationMapper.selectPerEmergencyDispatchApplicationList(perEmergencyDispatchApplication);
    }

    /**
     * 新增出警申请
     * 
     * @param perEmergencyDispatchApplication 出警申请
     * @return 结果
     */
    @Override
    public int insertPerEmergencyDispatchApplication(PerEmergencyDispatchApplication perEmergencyDispatchApplication)
    {
        return perEmergencyDispatchApplicationMapper.insertPerEmergencyDispatchApplication(perEmergencyDispatchApplication);
    }

    /**
     * 修改出警申请
     * 
     * @param perEmergencyDispatchApplication 出警申请
     * @return 结果
     */
    @Override
    public int updatePerEmergencyDispatchApplication(PerEmergencyDispatchApplication perEmergencyDispatchApplication)
    {
        perEmergencyDispatchApplication.setUpdateTime(DateUtils.getNowDate());
        return perEmergencyDispatchApplicationMapper.updatePerEmergencyDispatchApplication(perEmergencyDispatchApplication);
    }

    /**
     * 批量删除出警申请
     * 
     * @param overtimeIds 需要删除的出警申请主键
     * @return 结果
     */
    @Override
    public int deletePerEmergencyDispatchApplicationByOvertimeIds(Long[] overtimeIds)
    {
        return perEmergencyDispatchApplicationMapper.deletePerEmergencyDispatchApplicationByOvertimeIds(overtimeIds);
    }

    /**
     * 删除出警申请信息
     * 
     * @param overtimeId 出警申请主键
     * @return 结果
     */
    @Override
    public int deletePerEmergencyDispatchApplicationByOvertimeId(Long overtimeId)
    {
        return perEmergencyDispatchApplicationMapper.deletePerEmergencyDispatchApplicationByOvertimeId(overtimeId);
    }
}
